import { getAction, deleteAction, putAction, postAction, httpAction, downFile } from '@/api/manage'

const serviceName = '/sjsk-crowmanage-service'
/*-----------社戒社康人员管理-----------*/

// 咨询列表
const pageConsult = (params) => postAction(`${serviceName}/sjskConAppoint/pageConsult`, params)
const consultDetail = (params) => postAction(`${serviceName}/sjskConAppoint/consultDetails`, params)
const consultCancel = (params) => postAction(`${serviceName}/sjskConAppoint/consultCancel`, params)
const applyConsult = (params) => postAction(`${serviceName}/sjskConAppoint/consultEnter`, params)

const consultListExportXls = (params) =>
  downFile(`${serviceName}/sjskConAppoint/exportConsult`, params, 'post')

const applicationPsychological = (params) => postAction(`${serviceName}/sjskConAppoint/applicationPsychological`, params)
const consultApplication = (params) => postAction(`${serviceName}/sjskConAppoint/consultApplication`, params)
const consultHistory = (params) => postAction(`${serviceName}/sjskConAppoint/consultHistory`, params)
const consultNum = (params) => postAction(`${serviceName}/sjskConAppoint/consultNum`, params)


const planList = (userId) => getAction(`/sjsk-detection-service/plan/planList/${userId}`, null)
const checkPlan = (params) => getAction(`/sjsk-detection-service/plan/checkPlan`, params)


export {
  pageConsult,
  consultDetail,
  consultCancel,
  applicationPsychological,
  consultApplication,
  applyConsult,
  consultListExportXls,
  consultHistory,
  consultNum,
  planList,
  checkPlan
}
